package com.mycoffee.ui;

import java.util.ArrayList;

import android.R.integer;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;

import com.example.mycoffee.MainActivity;
import com.example.mycoffee.R;
import com.nineoldandroids.animation.Animator;
import com.nineoldandroids.animation.Animator.AnimatorListener;
import com.nineoldandroids.animation.ObjectAnimator;


public class Mymessage extends FragmentActivity{

	
//	 private View mLayout;
//	 private View mSearchlayout;
     private Mymessage.MyOnTouchListener myOnTouchListener;
     private boolean mIsTitleHide = false;
	 private boolean mIsAnim = false;
	 private float lastX = 0;
	 private float lastY = 0;

	private LinearLayout search1;
//	private TextView search;
	private ImageView first;
	private ScrollView scrollView;
	   @SuppressLint("Recycle")
	    @Override
	    protected void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.main);
	        FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
//	        fragmentTransaction.replace(R.id.fragment, new FragmentOne());
//	        fragmentTransaction.commit();
	    }

	   @Override
	    public boolean onCreateOptionsMenu(Menu menu) {
	        return true;
	    }
	    
	    
	    @Override
	    public boolean onOptionsItemSelected(MenuItem item) {
	        return super.onOptionsItemSelected(item);
	    }
	    
	    private ArrayList<MyOnTouchListener> onTouchListeners = new ArrayList<MyOnTouchListener>(10);
	    @Override
	    public boolean dispatchTouchEvent(MotionEvent ev) {
	        for (MyOnTouchListener listener : onTouchListeners) {
	            listener.dispatchTouchEvent(ev);
	        }
	        return super.dispatchTouchEvent(ev);
	    }

	    public void registerMyOnTouchListener(MyOnTouchListener myOnTouchListener) {
	        onTouchListeners.add(myOnTouchListener);
	    }

	    public void unregisterMyOnTouchListener(MyOnTouchListener myOnTouchListener) {
	        onTouchListeners.remove(myOnTouchListener);
	    }

	    public interface MyOnTouchListener {
	        public boolean dispatchTouchEvent(MotionEvent ev);
	    }
}